import Vue from 'vue'
import Vuex from 'vuex'
import actions from './actions'
import mutations from './mutations'
import getters from './getters'

Vue.use(Vuex)
// 创建vuex实例

const state = {
  userInfo: {}, //用户信息
  cartInfo: [] //购物车信息
}

const store = new Vuex.Store({
  state,
  actions,
  mutations,
  getters,
})

export default store